<template>
  <div class="personal-header">
    <div class="header-left">
      <rb-icon @click="onReturn" type="icon-luoshu-arrow-left" />
      <span>个人信息</span>
    </div>
    <div class="header-right">
      <Userinfo />
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import { useRouter } from 'vue-router';
import Userinfo from '@/components/common/Userinfo.vue';

export default defineComponent({
  name: 'PersonalHeader',
  components: {
    Userinfo,
  },
  setup() {
    const router = useRouter();
    const onReturn = () => {
      router.push({ path: '/' });
    };

    return {
      onReturn,
    };
  },
});
</script>

<style lang="less" scoped>
.personal-header {
  .flexRow();
  padding: 0 32px;
  height: 48px;
  line-height: 48px;
  background-color: @rb-primary-color;
  color: @rb-text-color-light;
  z-index: 2;
  .header-left {
    .flexRow();
    .rb-icon {
      font-size: 22px;
      padding-right: 6px;
      margin-right: 10px;
    }
  }
  .header-right {
    .flexRow();
  }
}
</style>
